package com.xhu.collegestudentrentalsystem.module.user.controller;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author zhu huilin
 * @date 2023/2/26 15:20
 */
@Controller
public class RouteController {

    /**
     *  首页
     */
    @RequestMapping("/index")
    public String indexPage(){
        return "/index";
    }

    /**
     *  登录页
     */
    @RequestMapping("/login")
    public String loginPage(){
        return "site/login";
    }

    /**
     *  注册页
     */
    @RequestMapping("/register")
    public String registerPage(){
        return "site/register";
    }

    /**
     * 跳转房源发布页面
     */
    @RequestMapping(value = "/houseAdd")
    public String houseList(){
        return "site/house-add";
    }

    /**
     * 跳转密码修改页面
     */
    @RequestMapping("/updatePasswordPage")
    public String updatePasswordPage(){
        return "site/password-update";
    }

    @RequestMapping("/starPage")
    public String test(){
        return "site/test";
    }

    /**
     * 用户跳转忘记密码页面
     */
    @RequestMapping("/forgotPage")
    public String forgotPassword(){
        return "site/email-code";
    }

    /**
     * 用户从忘记密码页跳转到修改密码页面
     */
    @RequestMapping("/updateForgotPasswordPage")
    public String updateForgotPasswordPage(){
        return "site/forgot-update";
    }
}
